<template>
  <div class="history">
    <div>
      <h4>搜索历史</h4>
      <div>删除</div>
    </div>
    <ul>
      <li v-for="(item, index) in history" :key="index">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "History",
  data() {
    return {
      history: [],
    };
  },
  components: {},
  methods: {},
  created() {
    if (this.$local.get("history")) {
      this.history = this.$local.get("history");
    }
  },
  mounted() {},
};
</script>

<style scoped lang='scss'>
.history {
  padding-top: 1.173333rem;
  div {
    display: flex;
    justify-content: space-between;
    height: 1.066667rem;
    line-height: 1.066667rem;
    padding: 0 0.533333rem;
    h4 {
      font-size: 0.48rem;
    }
    div {
      font-size: 0.426667rem;
    }
  }
  ul {
    display: flex;
    flex-wrap: wrap;
    li {
      padding: 0.053333rem 0.106667rem;
      margin: 0.133333rem;
      font-size: 0.373333rem;
      color: #fff;
      background-color: #aaa;
    }
  }
}
</style>